﻿SELECT name AS DB
FROM   master.dbo.sysdatabases (NOLOCK)
WHERE  name NOT IN ( 'tempdb' ) 